/*
 * Electricidad.java
 *
 * Creado el 7 de julio de 2007, 17:22
 * 
 * Autor: Victor Hugo Perez Alvarado
 * Email: ywegoster@gmail.com
 *
 */

package interfaz;

import core.Resistencia;
import core.Valor;
import core.Capacitor;
import exceptions.*;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author  Victor Hugo Perez Alvarado
 */
public class ResistenciaVisual extends javax.swing.JFrame {
    
    /** Creates new form Electricidad */
    public ResistenciaVisual() {
        initComponents();
        this.inicioValores();
        buttonGroup1.add(jRadioButton1);
        buttonGroup1.add(jRadioButton2);
        buttonGroup1.add(jRadioButton3);
        buttonGroup1.add(jRadioButton4);
        buttonGroup1.add(jRadioButton5);
        buttonGroup1.add(jRadioButton6);
        buttonGroup1.add(jRadioButton7);
        buttonGroup1.add(jRadioButton8);
        buttonGroup1.add(jRadioButton9);
        buttonGroup1.add(jRadioButton10);
        
        buttonGroup2.add(jRadioButton11);
        buttonGroup2.add(jRadioButton12);
        buttonGroup2.add(jRadioButton13);
        buttonGroup2.add(jRadioButton14);
        buttonGroup2.add(jRadioButton15);
        buttonGroup2.add(jRadioButton16);
        buttonGroup2.add(jRadioButton17);
        buttonGroup2.add(jRadioButton18);
        buttonGroup2.add(jRadioButton19);
        buttonGroup2.add(jRadioButton20);
        
        buttonGroup3.add(jRadioButton22);
        buttonGroup3.add(jRadioButton23);
        buttonGroup3.add(jRadioButton24);
        buttonGroup3.add(jRadioButton25);
        buttonGroup3.add(jRadioButton26);
        buttonGroup3.add(jRadioButton27);
        buttonGroup3.add(jRadioButton28);
        buttonGroup3.add(jRadioButton29);
        buttonGroup3.add(jRadioButton30);
        
        buttonGroup4.add(jRadioButton31);
        buttonGroup4.add(jRadioButton32);
        buttonGroup4.add(jRadioButton33);
        buttonGroup4.add(jRadioButton34);
        buttonGroup4.add(jRadioButton35);
        buttonGroup4.add(jRadioButton36);
        buttonGroup4.add(jRadioButton37);
        buttonGroup4.add(jRadioButton38);
        buttonGroup4.add(jRadioButton39);
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Código Generado  ">//GEN-BEGIN:initComponents
    private void initComponents() {
        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        buttonGroup4 = new javax.swing.ButtonGroup();
        jDesktopPane1 = new javax.swing.JDesktopPane();
        jInternalFrame1 = new javax.swing.JInternalFrame();
        jPanel1 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jPanel19 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        jButton31 = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jButton32 = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jButton33 = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jButton34 = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jButton35 = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        jPanel14 = new javax.swing.JPanel();
        jButton36 = new javax.swing.JButton();
        jLabel11 = new javax.swing.JLabel();
        jPanel15 = new javax.swing.JPanel();
        jButton37 = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        jPanel16 = new javax.swing.JPanel();
        jButton38 = new javax.swing.JButton();
        jLabel13 = new javax.swing.JLabel();
        jPanel17 = new javax.swing.JPanel();
        jButton39 = new javax.swing.JButton();
        jLabel14 = new javax.swing.JLabel();
        jPanel18 = new javax.swing.JPanel();
        jButton40 = new javax.swing.JButton();
        jLabel15 = new javax.swing.JLabel();
        jPanel20 = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        jPanel21 = new javax.swing.JPanel();
        jPColorPos1 = new javax.swing.JPanel();
        jLValorPos1 = new javax.swing.JLabel();
        jPanel22 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jPanel23 = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jPanel24 = new javax.swing.JPanel();
        jButton41 = new javax.swing.JButton();
        jLabel22 = new javax.swing.JLabel();
        jPanel25 = new javax.swing.JPanel();
        jButton42 = new javax.swing.JButton();
        jLabel23 = new javax.swing.JLabel();
        jPanel26 = new javax.swing.JPanel();
        jButton43 = new javax.swing.JButton();
        jLabel24 = new javax.swing.JLabel();
        jPanel27 = new javax.swing.JPanel();
        jButton44 = new javax.swing.JButton();
        jLabel25 = new javax.swing.JLabel();
        jPanel28 = new javax.swing.JPanel();
        jButton45 = new javax.swing.JButton();
        jLabel26 = new javax.swing.JLabel();
        jPanel29 = new javax.swing.JPanel();
        jButton46 = new javax.swing.JButton();
        jLabel27 = new javax.swing.JLabel();
        jPanel30 = new javax.swing.JPanel();
        jButton47 = new javax.swing.JButton();
        jLabel28 = new javax.swing.JLabel();
        jPanel31 = new javax.swing.JPanel();
        jButton48 = new javax.swing.JButton();
        jLabel29 = new javax.swing.JLabel();
        jPanel32 = new javax.swing.JPanel();
        jButton49 = new javax.swing.JButton();
        jLabel30 = new javax.swing.JLabel();
        jPanel33 = new javax.swing.JPanel();
        jButton50 = new javax.swing.JButton();
        jLabel31 = new javax.swing.JLabel();
        jPanel34 = new javax.swing.JPanel();
        jLabel32 = new javax.swing.JLabel();
        jPanel35 = new javax.swing.JPanel();
        jPanel46 = new javax.swing.JPanel();
        jPColorPos2 = new javax.swing.JPanel();
        jLValorPos2 = new javax.swing.JLabel();
        jPanel36 = new javax.swing.JPanel();
        jPanel45 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jPanel37 = new javax.swing.JPanel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jPanel38 = new javax.swing.JPanel();
        jButton51 = new javax.swing.JButton();
        jLabel36 = new javax.swing.JLabel();
        jPanel39 = new javax.swing.JPanel();
        jButton52 = new javax.swing.JButton();
        jLabel37 = new javax.swing.JLabel();
        jPanel40 = new javax.swing.JPanel();
        jButton53 = new javax.swing.JButton();
        jLabel38 = new javax.swing.JLabel();
        jPanel41 = new javax.swing.JPanel();
        jButton54 = new javax.swing.JButton();
        jLabel39 = new javax.swing.JLabel();
        jPanel42 = new javax.swing.JPanel();
        jButton55 = new javax.swing.JButton();
        jLabel40 = new javax.swing.JLabel();
        jPanel43 = new javax.swing.JPanel();
        jButton56 = new javax.swing.JButton();
        jLabel41 = new javax.swing.JLabel();
        jPanel44 = new javax.swing.JPanel();
        jButton57 = new javax.swing.JButton();
        jLabel42 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel48 = new javax.swing.JPanel();
        jLabel46 = new javax.swing.JLabel();
        jPanel49 = new javax.swing.JPanel();
        jPanel47 = new javax.swing.JPanel();
        jPColorMult = new javax.swing.JPanel();
        jLValorMult = new javax.swing.JLabel();
        jPanel50 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel51 = new javax.swing.JPanel();
        jLabel48 = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        jPanel52 = new javax.swing.JPanel();
        jButton61 = new javax.swing.JButton();
        jLabel50 = new javax.swing.JLabel();
        jPanel53 = new javax.swing.JPanel();
        jButton62 = new javax.swing.JButton();
        jLabel51 = new javax.swing.JLabel();
        jPanel54 = new javax.swing.JPanel();
        jButton63 = new javax.swing.JButton();
        jLabel52 = new javax.swing.JLabel();
        jPanel55 = new javax.swing.JPanel();
        jPanel56 = new javax.swing.JPanel();
        jPanel57 = new javax.swing.JPanel();
        jPanel58 = new javax.swing.JPanel();
        jPanel59 = new javax.swing.JPanel();
        jPanel60 = new javax.swing.JPanel();
        jPanel61 = new javax.swing.JPanel();
        jPanel62 = new javax.swing.JPanel();
        jLabel60 = new javax.swing.JLabel();
        jPanel63 = new javax.swing.JPanel();
        jPanel64 = new javax.swing.JPanel();
        jPColorTol = new javax.swing.JPanel();
        jLValorTol = new javax.swing.JLabel();
        jInternalFrame2 = new javax.swing.JInternalFrame();
        jPanel65 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLValorResistencia = new javax.swing.JLabel();
        jLTolerancia = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jInternalFrame3 = new javax.swing.JInternalFrame();
        jPanel66 = new javax.swing.JPanel(){
            public void paintComponent(Graphics g)
            {
                super.paintComponent(g);
                Image img = null;
                try{
                    img = javax.imageio.ImageIO.read(getClass().getResource("/resistencia.png"));
                }catch(Exception e){}

                if(img != null) g.drawImage(img, 0,0,this.getWidth(),this.getHeight(),this);
                else ;//g.drawString("Image not found", 50,50);
            }
        };
        jInternalFrame4 = new javax.swing.JInternalFrame();
        jLabel43 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel47 = new javax.swing.JLabel();
        jPanel67 = new javax.swing.JPanel();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jRadioButton3 = new javax.swing.JRadioButton();
        jRadioButton4 = new javax.swing.JRadioButton();
        jRadioButton5 = new javax.swing.JRadioButton();
        jRadioButton6 = new javax.swing.JRadioButton();
        jRadioButton7 = new javax.swing.JRadioButton();
        jRadioButton8 = new javax.swing.JRadioButton();
        jRadioButton9 = new javax.swing.JRadioButton();
        jRadioButton10 = new javax.swing.JRadioButton();
        jPanel68 = new javax.swing.JPanel();
        jRadioButton11 = new javax.swing.JRadioButton();
        jRadioButton12 = new javax.swing.JRadioButton();
        jRadioButton13 = new javax.swing.JRadioButton();
        jRadioButton14 = new javax.swing.JRadioButton();
        jRadioButton15 = new javax.swing.JRadioButton();
        jRadioButton16 = new javax.swing.JRadioButton();
        jRadioButton17 = new javax.swing.JRadioButton();
        jRadioButton18 = new javax.swing.JRadioButton();
        jRadioButton19 = new javax.swing.JRadioButton();
        jRadioButton20 = new javax.swing.JRadioButton();
        jPanel69 = new javax.swing.JPanel();
        jRadioButton22 = new javax.swing.JRadioButton();
        jRadioButton23 = new javax.swing.JRadioButton();
        jRadioButton24 = new javax.swing.JRadioButton();
        jRadioButton25 = new javax.swing.JRadioButton();
        jRadioButton26 = new javax.swing.JRadioButton();
        jRadioButton27 = new javax.swing.JRadioButton();
        jRadioButton28 = new javax.swing.JRadioButton();
        jRadioButton29 = new javax.swing.JRadioButton();
        jRadioButton30 = new javax.swing.JRadioButton();
        jLabel53 = new javax.swing.JLabel();
        jPanel70 = new javax.swing.JPanel();
        jRadioButton31 = new javax.swing.JRadioButton();
        jRadioButton32 = new javax.swing.JRadioButton();
        jRadioButton33 = new javax.swing.JRadioButton();
        jRadioButton34 = new javax.swing.JRadioButton();
        jRadioButton35 = new javax.swing.JRadioButton();
        jRadioButton36 = new javax.swing.JRadioButton();
        jRadioButton37 = new javax.swing.JRadioButton();
        jRadioButton38 = new javax.swing.JRadioButton();
        jRadioButton39 = new javax.swing.JRadioButton();
        jInternalFrame5 = new javax.swing.JInternalFrame();
        jLabel54 = new javax.swing.JLabel();
        jLabel55 = new javax.swing.JLabel();
        jLValorCapacitor = new javax.swing.JLabel();
        jLToleranciaCapacitor = new javax.swing.JLabel();
        jLabel56 = new javax.swing.JLabel();
        jLabel57 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jDesktopPane1.setBackground(new java.awt.Color(51, 102, 255));
        jInternalFrame1.setResizable(true);
        jInternalFrame1.setTitle("Valores");
        jInternalFrame1.setVisible(true);
        jPanel1.setLayout(new java.awt.GridLayout(1, 0, 10, 0));

        jPanel8.setLayout(new java.awt.GridLayout(14, 0));

        jPanel8.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel6.setLayout(new java.awt.GridLayout(1, 0));

        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("VALOR 1");
        jPanel6.add(jLabel2);

        jPanel8.add(jPanel6);

        jPanel19.setLayout(new java.awt.GridLayout(1, 0));

        jPanel19.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel16.setText("Color");
        jPanel19.add(jLabel16);

        jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel17.setText("Valor");
        jPanel19.add(jLabel17);

        jPanel8.add(jPanel19);

        jPanel9.setLayout(new java.awt.GridLayout(1, 0));

        jButton31.setBackground(new java.awt.Color(0, 0, 0));
        jButton31.setForeground(new java.awt.Color(255, 255, 255));
        jButton31.setText("Negro");
        jButton31.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton31.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton31ActionPerformed(evt);
            }
        });

        jPanel9.add(jButton31);

        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel6.setText("0");
        jPanel9.add(jLabel6);

        jPanel8.add(jPanel9);

        jPanel10.setLayout(new java.awt.GridLayout(1, 0));

        jButton32.setBackground(new java.awt.Color(153, 51, 0));
        jButton32.setForeground(new java.awt.Color(255, 255, 255));
        jButton32.setText("Cafe");
        jButton32.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton32.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton32ActionPerformed(evt);
            }
        });

        jPanel10.add(jButton32);

        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel7.setText("1");
        jPanel10.add(jLabel7);

        jPanel8.add(jPanel10);

        jPanel11.setLayout(new java.awt.GridLayout(1, 0));

        jButton33.setBackground(new java.awt.Color(255, 0, 0));
        jButton33.setText("Rojo");
        jButton33.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton33.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton33ActionPerformed(evt);
            }
        });

        jPanel11.add(jButton33);

        jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel8.setText("2");
        jPanel11.add(jLabel8);

        jPanel8.add(jPanel11);

        jPanel12.setLayout(new java.awt.GridLayout(1, 0));

        jButton34.setText("Naranja");
        jButton34.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton34.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton34ActionPerformed(evt);
            }
        });

        jPanel12.add(jButton34);

        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel9.setText("3");
        jPanel12.add(jLabel9);

        jPanel8.add(jPanel12);

        jPanel13.setLayout(new java.awt.GridLayout(1, 0));

        jButton35.setBackground(new java.awt.Color(255, 255, 0));
        jButton35.setText("Amarillo");
        jButton35.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton35.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton35ActionPerformed(evt);
            }
        });

        jPanel13.add(jButton35);

        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel10.setText("4");
        jPanel13.add(jLabel10);

        jPanel8.add(jPanel13);

        jPanel14.setLayout(new java.awt.GridLayout(1, 0));

        jButton36.setBackground(new java.awt.Color(0, 255, 0));
        jButton36.setText("Verde");
        jButton36.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton36.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton36ActionPerformed(evt);
            }
        });

        jPanel14.add(jButton36);

        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel11.setText("5");
        jPanel14.add(jLabel11);

        jPanel8.add(jPanel14);

        jPanel15.setLayout(new java.awt.GridLayout(1, 0));

        jButton37.setBackground(new java.awt.Color(0, 0, 255));
        jButton37.setText("Azul");
        jButton37.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton37.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton37ActionPerformed(evt);
            }
        });

        jPanel15.add(jButton37);

        jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel12.setText("6");
        jPanel15.add(jLabel12);

        jPanel8.add(jPanel15);

        jPanel16.setLayout(new java.awt.GridLayout(1, 0));

        jButton38.setBackground(java.awt.Color.magenta);
        jButton38.setText("Violeta");
        jButton38.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton38.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton38ActionPerformed(evt);
            }
        });

        jPanel16.add(jButton38);

        jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel13.setText("7");
        jPanel16.add(jLabel13);

        jPanel8.add(jPanel16);

        jPanel17.setLayout(new java.awt.GridLayout(1, 0));

        jButton39.setText("Gris");
        jButton39.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton39.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton39ActionPerformed(evt);
            }
        });

        jPanel17.add(jButton39);

        jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel14.setText("8");
        jPanel17.add(jLabel14);

        jPanel8.add(jPanel17);

        jPanel18.setLayout(new java.awt.GridLayout(1, 0));

        jButton40.setBackground(new java.awt.Color(255, 255, 255));
        jButton40.setText("Blanco");
        jButton40.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton40.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton40ActionPerformed(evt);
            }
        });

        jPanel18.add(jButton40);

        jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel15.setText("9");
        jPanel18.add(jLabel15);

        jPanel8.add(jPanel18);

        jPanel20.setLayout(new java.awt.GridLayout(1, 0));

        jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel18.setText("Color");
        jPanel20.add(jLabel18);

        jPanel8.add(jPanel20);

        jPanel21.setLayout(new java.awt.GridLayout(1, 2));

        jPColorPos1.setBackground(new java.awt.Color(0, 0, 0));
        org.jdesktop.layout.GroupLayout jPColorPos1Layout = new org.jdesktop.layout.GroupLayout(jPColorPos1);
        jPColorPos1.setLayout(jPColorPos1Layout);
        jPColorPos1Layout.setHorizontalGroup(
            jPColorPos1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 88, Short.MAX_VALUE)
        );
        jPColorPos1Layout.setVerticalGroup(
            jPColorPos1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 30, Short.MAX_VALUE)
        );
        jPanel21.add(jPColorPos1);

        jLValorPos1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLValorPos1.setText("0");
        jPanel21.add(jLValorPos1);

        jPanel8.add(jPanel21);

        jPanel1.add(jPanel8);

        jPanel22.setLayout(new java.awt.GridLayout(14, 0));

        jPanel22.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel7.setLayout(new java.awt.GridLayout(1, 0));

        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("VALOR 2");
        jPanel7.add(jLabel3);

        jPanel22.add(jPanel7);

        jPanel23.setLayout(new java.awt.GridLayout(1, 0));

        jPanel23.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel20.setText("Color");
        jPanel23.add(jLabel20);

        jLabel21.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel21.setText("Valor");
        jPanel23.add(jLabel21);

        jPanel22.add(jPanel23);

        jPanel24.setLayout(new java.awt.GridLayout(1, 0));

        jButton41.setBackground(new java.awt.Color(0, 0, 0));
        jButton41.setForeground(new java.awt.Color(255, 255, 255));
        jButton41.setText("Negro");
        jButton41.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton41.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton41ActionPerformed(evt);
            }
        });

        jPanel24.add(jButton41);

        jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel22.setText("0");
        jPanel24.add(jLabel22);

        jPanel22.add(jPanel24);

        jPanel25.setLayout(new java.awt.GridLayout(1, 0));

        jButton42.setBackground(new java.awt.Color(153, 51, 0));
        jButton42.setForeground(new java.awt.Color(255, 255, 255));
        jButton42.setText("Cafe");
        jButton42.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton42.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton42ActionPerformed(evt);
            }
        });

        jPanel25.add(jButton42);

        jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel23.setText("1");
        jPanel25.add(jLabel23);

        jPanel22.add(jPanel25);

        jPanel26.setLayout(new java.awt.GridLayout(1, 0));

        jButton43.setBackground(new java.awt.Color(255, 0, 0));
        jButton43.setText("Rojo");
        jButton43.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton43.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton43ActionPerformed(evt);
            }
        });

        jPanel26.add(jButton43);

        jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel24.setText("2");
        jPanel26.add(jLabel24);

        jPanel22.add(jPanel26);

        jPanel27.setLayout(new java.awt.GridLayout(1, 0));

        jButton44.setText("Naranja");
        jButton44.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton44.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton44ActionPerformed(evt);
            }
        });

        jPanel27.add(jButton44);

        jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel25.setText("3");
        jPanel27.add(jLabel25);

        jPanel22.add(jPanel27);

        jPanel28.setLayout(new java.awt.GridLayout(1, 0));

        jButton45.setBackground(new java.awt.Color(255, 255, 0));
        jButton45.setText("Amarillo");
        jButton45.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton45.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton45ActionPerformed(evt);
            }
        });

        jPanel28.add(jButton45);

        jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel26.setText("4");
        jPanel28.add(jLabel26);

        jPanel22.add(jPanel28);

        jPanel29.setLayout(new java.awt.GridLayout(1, 0));

        jButton46.setBackground(new java.awt.Color(0, 255, 0));
        jButton46.setText("Verde");
        jButton46.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton46.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton46ActionPerformed(evt);
            }
        });

        jPanel29.add(jButton46);

        jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel27.setText("5");
        jPanel29.add(jLabel27);

        jPanel22.add(jPanel29);

        jPanel30.setLayout(new java.awt.GridLayout(1, 0));

        jButton47.setBackground(new java.awt.Color(0, 0, 255));
        jButton47.setText("Azul");
        jButton47.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton47.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton47ActionPerformed(evt);
            }
        });

        jPanel30.add(jButton47);

        jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel28.setText("6");
        jPanel30.add(jLabel28);

        jPanel22.add(jPanel30);

        jPanel31.setLayout(new java.awt.GridLayout(1, 0));

        jButton48.setBackground(java.awt.Color.magenta);
        jButton48.setText("Violeta");
        jButton48.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton48.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton48ActionPerformed(evt);
            }
        });

        jPanel31.add(jButton48);

        jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel29.setText("7");
        jPanel31.add(jLabel29);

        jPanel22.add(jPanel31);

        jPanel32.setLayout(new java.awt.GridLayout(1, 0));

        jButton49.setText("Gris");
        jButton49.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton49.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton49ActionPerformed(evt);
            }
        });

        jPanel32.add(jButton49);

        jLabel30.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel30.setText("8");
        jPanel32.add(jLabel30);

        jPanel22.add(jPanel32);

        jPanel33.setLayout(new java.awt.GridLayout(1, 0));

        jButton50.setBackground(new java.awt.Color(255, 255, 255));
        jButton50.setText("Blanco");
        jButton50.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton50.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton50ActionPerformed(evt);
            }
        });

        jPanel33.add(jButton50);

        jLabel31.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel31.setText("9");
        jPanel33.add(jLabel31);

        jPanel22.add(jPanel33);

        jPanel34.setLayout(new java.awt.GridLayout(1, 0));

        jLabel32.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel32.setText("Color");
        jPanel34.add(jLabel32);

        jPanel22.add(jPanel34);

        jPanel35.setLayout(new java.awt.GridLayout(1, 0));

        jPanel46.setLayout(new java.awt.GridLayout(1, 2));

        jPColorPos2.setBackground(new java.awt.Color(0, 0, 0));
        org.jdesktop.layout.GroupLayout jPColorPos2Layout = new org.jdesktop.layout.GroupLayout(jPColorPos2);
        jPColorPos2.setLayout(jPColorPos2Layout);
        jPColorPos2Layout.setHorizontalGroup(
            jPColorPos2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 88, Short.MAX_VALUE)
        );
        jPColorPos2Layout.setVerticalGroup(
            jPColorPos2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 30, Short.MAX_VALUE)
        );
        jPanel46.add(jPColorPos2);

        jLValorPos2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLValorPos2.setText("0");
        jPanel46.add(jLValorPos2);

        jPanel35.add(jPanel46);

        jPanel22.add(jPanel35);

        jPanel1.add(jPanel22);

        jPanel36.setLayout(new java.awt.GridLayout(14, 0));

        jPanel36.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel45.setLayout(new java.awt.GridLayout(1, 0));

        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText("MULTIPLICADOR");
        jPanel45.add(jLabel4);

        jPanel36.add(jPanel45);

        jPanel37.setLayout(new java.awt.GridLayout(1, 0));

        jPanel37.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jLabel34.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel34.setText("Color");
        jPanel37.add(jLabel34);

        jLabel35.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel35.setText("Valor");
        jPanel37.add(jLabel35);

        jPanel36.add(jPanel37);

        jPanel38.setLayout(new java.awt.GridLayout(1, 0));

        jButton51.setBackground(new java.awt.Color(0, 0, 0));
        jButton51.setForeground(new java.awt.Color(255, 255, 255));
        jButton51.setText("Negro");
        jButton51.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton51.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton51ActionPerformed(evt);
            }
        });

        jPanel38.add(jButton51);

        jLabel36.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel36.setText("x1");
        jPanel38.add(jLabel36);

        jPanel36.add(jPanel38);

        jPanel39.setLayout(new java.awt.GridLayout(1, 0));

        jButton52.setBackground(new java.awt.Color(153, 51, 0));
        jButton52.setForeground(new java.awt.Color(255, 255, 255));
        jButton52.setText("Cafe");
        jButton52.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton52.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton52ActionPerformed(evt);
            }
        });

        jPanel39.add(jButton52);

        jLabel37.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel37.setText("x10");
        jPanel39.add(jLabel37);

        jPanel36.add(jPanel39);

        jPanel40.setLayout(new java.awt.GridLayout(1, 0));

        jButton53.setBackground(new java.awt.Color(255, 0, 0));
        jButton53.setText("Rojo");
        jButton53.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton53.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton53ActionPerformed(evt);
            }
        });

        jPanel40.add(jButton53);

        jLabel38.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel38.setText("x100");
        jPanel40.add(jLabel38);

        jPanel36.add(jPanel40);

        jPanel41.setLayout(new java.awt.GridLayout(1, 0));

        jButton54.setText("Naranja");
        jButton54.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton54.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton54ActionPerformed(evt);
            }
        });

        jPanel41.add(jButton54);

        jLabel39.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel39.setText("x1000");
        jPanel41.add(jLabel39);

        jPanel36.add(jPanel41);

        jPanel42.setLayout(new java.awt.GridLayout(1, 0));

        jButton55.setBackground(new java.awt.Color(255, 255, 0));
        jButton55.setText("Amarillo");
        jButton55.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton55.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton55ActionPerformed(evt);
            }
        });

        jPanel42.add(jButton55);

        jLabel40.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel40.setText("x10000");
        jPanel42.add(jLabel40);

        jPanel36.add(jPanel42);

        jPanel43.setLayout(new java.awt.GridLayout(1, 0));

        jButton56.setBackground(new java.awt.Color(0, 255, 0));
        jButton56.setText("Verde");
        jButton56.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton56.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton56ActionPerformed(evt);
            }
        });

        jPanel43.add(jButton56);

        jLabel41.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel41.setText("x100000");
        jPanel43.add(jLabel41);

        jPanel36.add(jPanel43);

        jPanel44.setLayout(new java.awt.GridLayout(1, 0));

        jButton57.setBackground(new java.awt.Color(0, 0, 255));
        jButton57.setText("Azul");
        jButton57.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton57.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton57ActionPerformed(evt);
            }
        });

        jPanel44.add(jButton57);

        jLabel42.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel42.setText("x1000000");
        jPanel44.add(jLabel42);

        jPanel36.add(jPanel44);

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 176, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 30, Short.MAX_VALUE)
        );
        jPanel36.add(jPanel2);

        org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 176, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 30, Short.MAX_VALUE)
        );
        jPanel36.add(jPanel3);

        org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 176, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 30, Short.MAX_VALUE)
        );
        jPanel36.add(jPanel4);

        jPanel48.setLayout(new java.awt.GridLayout(1, 0));

        jLabel46.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel46.setText("Color");
        jPanel48.add(jLabel46);

        jPanel36.add(jPanel48);

        jPanel49.setLayout(new java.awt.GridLayout(1, 0));

        jPanel47.setLayout(new java.awt.GridLayout(1, 2));

        jPColorMult.setBackground(new java.awt.Color(0, 0, 0));
        org.jdesktop.layout.GroupLayout jPColorMultLayout = new org.jdesktop.layout.GroupLayout(jPColorMult);
        jPColorMult.setLayout(jPColorMultLayout);
        jPColorMultLayout.setHorizontalGroup(
            jPColorMultLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 88, Short.MAX_VALUE)
        );
        jPColorMultLayout.setVerticalGroup(
            jPColorMultLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 30, Short.MAX_VALUE)
        );
        jPanel47.add(jPColorMult);

        jLValorMult.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLValorMult.setText("1");
        jPanel47.add(jLValorMult);

        jPanel49.add(jPanel47);

        jPanel36.add(jPanel49);

        jPanel1.add(jPanel36);

        jPanel50.setLayout(new java.awt.GridLayout(14, 0));

        jPanel50.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel5.setLayout(new java.awt.GridLayout(1, 0));

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("TOLERANCIA");
        jPanel5.add(jLabel1);

        jPanel50.add(jPanel5);

        jPanel51.setLayout(new java.awt.GridLayout(1, 0));

        jPanel51.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jLabel48.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel48.setText("Color");
        jPanel51.add(jLabel48);

        jLabel49.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel49.setText("Valor");
        jPanel51.add(jLabel49);

        jPanel50.add(jPanel51);

        jPanel52.setLayout(new java.awt.GridLayout(1, 0));

        jButton61.setBackground(new java.awt.Color(204, 204, 0));
        jButton61.setText("Dorado");
        jButton61.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton61.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton61ActionPerformed(evt);
            }
        });

        jPanel52.add(jButton61);

        jLabel50.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel50.setText("5%");
        jPanel52.add(jLabel50);

        jPanel50.add(jPanel52);

        jPanel53.setLayout(new java.awt.GridLayout(1, 0));

        jButton62.setText("Plateado");
        jButton62.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton62.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton62ActionPerformed(evt);
            }
        });

        jPanel53.add(jButton62);

        jLabel51.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel51.setText("10%");
        jPanel53.add(jLabel51);

        jPanel50.add(jPanel53);

        jPanel54.setLayout(new java.awt.GridLayout(1, 0));

        jButton63.setText("Ninguno");
        jButton63.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton63.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton63ActionPerformed(evt);
            }
        });

        jPanel54.add(jButton63);

        jLabel52.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel52.setText("20%");
        jPanel54.add(jLabel52);

        jPanel50.add(jPanel54);

        jPanel55.setLayout(new java.awt.GridLayout(1, 0));

        jPanel50.add(jPanel55);

        jPanel56.setLayout(new java.awt.GridLayout(1, 0));

        jPanel50.add(jPanel56);

        jPanel57.setLayout(new java.awt.GridLayout(1, 0));

        jPanel50.add(jPanel57);

        jPanel58.setLayout(new java.awt.GridLayout(1, 0));

        jPanel50.add(jPanel58);

        jPanel59.setLayout(new java.awt.GridLayout(1, 0));

        jPanel50.add(jPanel59);

        jPanel60.setLayout(new java.awt.GridLayout(1, 0));

        jPanel50.add(jPanel60);

        jPanel61.setLayout(new java.awt.GridLayout(1, 0));

        jPanel50.add(jPanel61);

        jPanel62.setLayout(new java.awt.GridLayout(1, 0));

        jLabel60.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel60.setText("Color");
        jPanel62.add(jLabel60);

        jPanel50.add(jPanel62);

        jPanel63.setLayout(new java.awt.GridLayout(1, 0));

        jPanel64.setLayout(new java.awt.GridLayout(1, 2));

        jPColorTol.setBackground(new java.awt.Color(204, 204, 0));
        org.jdesktop.layout.GroupLayout jPColorTolLayout = new org.jdesktop.layout.GroupLayout(jPColorTol);
        jPColorTol.setLayout(jPColorTolLayout);
        jPColorTolLayout.setHorizontalGroup(
            jPColorTolLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 88, Short.MAX_VALUE)
        );
        jPColorTolLayout.setVerticalGroup(
            jPColorTolLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 30, Short.MAX_VALUE)
        );
        jPanel64.add(jPColorTol);

        jLValorTol.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLValorTol.setText("5%");
        jPanel64.add(jLValorTol);

        jPanel63.add(jPanel64);

        jPanel50.add(jPanel63);

        jPanel1.add(jPanel50);

        jInternalFrame1.getContentPane().add(jPanel1);

        jInternalFrame1.setBounds(0, 0, 760, 460);
        jDesktopPane1.add(jInternalFrame1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jInternalFrame2.setIconifiable(true);
        jInternalFrame2.setMaximizable(true);
        jInternalFrame2.setTitle("Resultados");
        jInternalFrame2.setVisible(true);
        jPanel65.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jLabel5.setText("Valor de la resistencia:");

        jLValorResistencia.setFont(new java.awt.Font("Lucida Grande", 0, 18));
        jLValorResistencia.setText("Valor");

        jLTolerancia.setFont(new java.awt.Font("Lucida Grande", 0, 14));
        jLTolerancia.setText("tol");

        jLabel19.setText("%");

        jLabel33.setText("Tolerancia:");

        org.jdesktop.layout.GroupLayout jPanel65Layout = new org.jdesktop.layout.GroupLayout(jPanel65);
        jPanel65.setLayout(jPanel65Layout);
        jPanel65Layout.setHorizontalGroup(
            jPanel65Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel65Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel65Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel65Layout.createSequentialGroup()
                        .add(jLabel5)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLValorResistencia))
                    .add(jPanel65Layout.createSequentialGroup()
                        .add(jLabel33)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLTolerancia)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel19)))
                .addContainerGap(139, Short.MAX_VALUE))
        );
        jPanel65Layout.setVerticalGroup(
            jPanel65Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel65Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel65Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel5)
                    .add(jLValorResistencia))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel65Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel33)
                    .add(jLabel19)
                    .add(jLTolerancia))
                .addContainerGap(23, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout jInternalFrame2Layout = new org.jdesktop.layout.GroupLayout(jInternalFrame2.getContentPane());
        jInternalFrame2.getContentPane().setLayout(jInternalFrame2Layout);
        jInternalFrame2Layout.setHorizontalGroup(
            jInternalFrame2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jInternalFrame2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel65, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jInternalFrame2Layout.setVerticalGroup(
            jInternalFrame2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jInternalFrame2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel65, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jInternalFrame2.setBounds(20, 470, 380, 140);
        jDesktopPane1.add(jInternalFrame2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jInternalFrame3.setIconifiable(true);
        jInternalFrame3.setMaximizable(true);
        jInternalFrame3.setResizable(true);
        jInternalFrame3.setTitle("Resistencia");
        jInternalFrame3.setVisible(true);
        org.jdesktop.layout.GroupLayout jPanel66Layout = new org.jdesktop.layout.GroupLayout(jPanel66);
        jPanel66.setLayout(jPanel66Layout);
        jPanel66Layout.setHorizontalGroup(
            jPanel66Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 320, Short.MAX_VALUE)
        );
        jPanel66Layout.setVerticalGroup(
            jPanel66Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 118, Short.MAX_VALUE)
        );

        org.jdesktop.layout.GroupLayout jInternalFrame3Layout = new org.jdesktop.layout.GroupLayout(jInternalFrame3.getContentPane());
        jInternalFrame3.getContentPane().setLayout(jInternalFrame3Layout);
        jInternalFrame3Layout.setHorizontalGroup(
            jInternalFrame3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel66, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jInternalFrame3Layout.setVerticalGroup(
            jInternalFrame3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel66, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jInternalFrame3.setBounds(410, 470, 330, 150);
        jDesktopPane1.add(jInternalFrame3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jInternalFrame4.setVisible(true);
        jLabel43.setFont(new java.awt.Font("Dialog", 1, 18));
        jLabel43.setText("CALCULO DE CAPACITORES CERAMICOS");

        jLabel44.setText("1er Num");

        jLabel45.setText("2do Num");

        jLabel47.setText("3er Num");

        jRadioButton1.setText("0");
        jRadioButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton1.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });

        jRadioButton2.setText("1");
        jRadioButton2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton2.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2ActionPerformed(evt);
            }
        });

        jRadioButton3.setText("2");
        jRadioButton3.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton3.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton3ActionPerformed(evt);
            }
        });

        jRadioButton4.setText("3");
        jRadioButton4.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton4.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton4ActionPerformed(evt);
            }
        });

        jRadioButton5.setText("4");
        jRadioButton5.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton5.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton5ActionPerformed(evt);
            }
        });

        jRadioButton6.setText("5");
        jRadioButton6.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton6.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton6ActionPerformed(evt);
            }
        });

        jRadioButton7.setText("6");
        jRadioButton7.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton7.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton7ActionPerformed(evt);
            }
        });

        jRadioButton8.setText("7");
        jRadioButton8.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton8.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton8ActionPerformed(evt);
            }
        });

        jRadioButton9.setText("8");
        jRadioButton9.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton9.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton9ActionPerformed(evt);
            }
        });

        jRadioButton10.setText("9");
        jRadioButton10.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton10.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton10ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel67Layout = new org.jdesktop.layout.GroupLayout(jPanel67);
        jPanel67.setLayout(jPanel67Layout);
        jPanel67Layout.setHorizontalGroup(
            jPanel67Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel67Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel67Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jRadioButton1)
                    .add(jRadioButton2)
                    .add(jRadioButton3)
                    .add(jRadioButton4)
                    .add(jRadioButton5)
                    .add(jRadioButton6)
                    .add(jRadioButton7)
                    .add(jRadioButton8)
                    .add(jRadioButton9)
                    .add(jRadioButton10))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel67Layout.setVerticalGroup(
            jPanel67Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel67Layout.createSequentialGroup()
                .addContainerGap()
                .add(jRadioButton1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton2)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton3)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton4)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton5)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton6)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton7)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton8)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton9)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jRadioButton10)
                .addContainerGap())
        );

        jRadioButton11.setText("0");
        jRadioButton11.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton11.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton11ActionPerformed(evt);
            }
        });

        jRadioButton12.setText("1");
        jRadioButton12.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton12.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton12ActionPerformed(evt);
            }
        });

        jRadioButton13.setText("2");
        jRadioButton13.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton13.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton13ActionPerformed(evt);
            }
        });

        jRadioButton14.setText("3");
        jRadioButton14.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton14.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton14ActionPerformed(evt);
            }
        });

        jRadioButton15.setText("4");
        jRadioButton15.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton15.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton15ActionPerformed(evt);
            }
        });

        jRadioButton16.setText("5");
        jRadioButton16.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton16.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton16ActionPerformed(evt);
            }
        });

        jRadioButton17.setText("6");
        jRadioButton17.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton17.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton17ActionPerformed(evt);
            }
        });

        jRadioButton18.setText("7");
        jRadioButton18.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton18.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton18ActionPerformed(evt);
            }
        });

        jRadioButton19.setText("8");
        jRadioButton19.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton19.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton19ActionPerformed(evt);
            }
        });

        jRadioButton20.setText("9");
        jRadioButton20.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton20.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton20ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel68Layout = new org.jdesktop.layout.GroupLayout(jPanel68);
        jPanel68.setLayout(jPanel68Layout);
        jPanel68Layout.setHorizontalGroup(
            jPanel68Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel68Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel68Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jRadioButton12)
                    .add(jRadioButton13)
                    .add(jRadioButton14)
                    .add(jRadioButton15)
                    .add(jRadioButton16)
                    .add(jRadioButton17)
                    .add(jRadioButton18)
                    .add(jRadioButton19)
                    .add(jRadioButton20))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel68Layout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jRadioButton11)
                .addContainerGap())
        );
        jPanel68Layout.setVerticalGroup(
            jPanel68Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel68Layout.createSequentialGroup()
                .addContainerGap()
                .add(jRadioButton11)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton12)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton13)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton14)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton15)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton16)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton17)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton18)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton19)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jRadioButton20)
                .addContainerGap())
        );

        jRadioButton22.setText("1");
        jRadioButton22.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton22.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton22ActionPerformed(evt);
            }
        });

        jRadioButton23.setText("2");
        jRadioButton23.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton23.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton23ActionPerformed(evt);
            }
        });

        jRadioButton24.setText("3");
        jRadioButton24.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton24.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton24.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton24ActionPerformed(evt);
            }
        });

        jRadioButton25.setText("4");
        jRadioButton25.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton25.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton25.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton25ActionPerformed(evt);
            }
        });

        jRadioButton26.setText("5");
        jRadioButton26.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton26.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton26.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton26ActionPerformed(evt);
            }
        });

        jRadioButton27.setText("6");
        jRadioButton27.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton27.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton27.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton27ActionPerformed(evt);
            }
        });

        jRadioButton28.setText("7");
        jRadioButton28.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton28.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton28.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton28ActionPerformed(evt);
            }
        });

        jRadioButton29.setText("8");
        jRadioButton29.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton29.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton29.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton29ActionPerformed(evt);
            }
        });

        jRadioButton30.setText("9");
        jRadioButton30.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton30.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton30.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton30ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel69Layout = new org.jdesktop.layout.GroupLayout(jPanel69);
        jPanel69.setLayout(jPanel69Layout);
        jPanel69Layout.setHorizontalGroup(
            jPanel69Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel69Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel69Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jRadioButton22)
                    .add(jRadioButton23)
                    .add(jRadioButton24)
                    .add(jRadioButton25)
                    .add(jRadioButton26)
                    .add(jRadioButton27)
                    .add(jRadioButton28)
                    .add(jRadioButton29)
                    .add(jRadioButton30))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel69Layout.setVerticalGroup(
            jPanel69Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel69Layout.createSequentialGroup()
                .addContainerGap()
                .add(jRadioButton22)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton23)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton24)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton25)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton26)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton27)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton28)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton29)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jRadioButton30)
                .addContainerGap())
        );

        jLabel53.setText("Tolerancia");

        jRadioButton31.setText("F");
        jRadioButton31.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton31.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton31.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton31ActionPerformed(evt);
            }
        });

        jRadioButton32.setText("G");
        jRadioButton32.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton32.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton32.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton32ActionPerformed(evt);
            }
        });

        jRadioButton33.setText("H");
        jRadioButton33.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton33.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton33.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton33ActionPerformed(evt);
            }
        });

        jRadioButton34.setText("J");
        jRadioButton34.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton34.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton34.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton34ActionPerformed(evt);
            }
        });

        jRadioButton35.setText("K");
        jRadioButton35.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton35.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton35.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton35ActionPerformed(evt);
            }
        });

        jRadioButton36.setText("M");
        jRadioButton36.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton36.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton36.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton36ActionPerformed(evt);
            }
        });

        jRadioButton37.setText("S");
        jRadioButton37.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton37.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton37.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton37ActionPerformed(evt);
            }
        });

        jRadioButton38.setText("Z");
        jRadioButton38.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton38.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton38.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton38ActionPerformed(evt);
            }
        });

        jRadioButton39.setText("P");
        jRadioButton39.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jRadioButton39.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jRadioButton39.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton39ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel70Layout = new org.jdesktop.layout.GroupLayout(jPanel70);
        jPanel70.setLayout(jPanel70Layout);
        jPanel70Layout.setHorizontalGroup(
            jPanel70Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel70Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel70Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jRadioButton31)
                    .add(jRadioButton33)
                    .add(jRadioButton34)
                    .add(jRadioButton36)
                    .add(jRadioButton38)
                    .add(jRadioButton39)
                    .add(jRadioButton32)
                    .add(jRadioButton35)
                    .add(jRadioButton37))
                .addContainerGap(24, Short.MAX_VALUE))
        );
        jPanel70Layout.setVerticalGroup(
            jPanel70Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel70Layout.createSequentialGroup()
                .addContainerGap()
                .add(jRadioButton31)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton32)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton33)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton34)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton35)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton36)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton37)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton38)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButton39)
                .addContainerGap(33, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout jInternalFrame4Layout = new org.jdesktop.layout.GroupLayout(jInternalFrame4.getContentPane());
        jInternalFrame4.getContentPane().setLayout(jInternalFrame4Layout);
        jInternalFrame4Layout.setHorizontalGroup(
            jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jInternalFrame4Layout.createSequentialGroup()
                .addContainerGap()
                .add(jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jLabel43)
                    .add(jInternalFrame4Layout.createSequentialGroup()
                        .add(jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jInternalFrame4Layout.createSequentialGroup()
                                .add(12, 12, 12)
                                .add(jPanel67, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(jLabel44, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(jLabel45)
                            .add(jPanel68, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(26, 26, 26)
                        .add(jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(jLabel47)
                            .add(jPanel69, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(31, 31, 31)
                        .add(jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jPanel70, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(jLabel53, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jInternalFrame4Layout.setVerticalGroup(
            jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jInternalFrame4Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel43)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel44)
                    .add(jLabel45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel47)
                    .add(jLabel53))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jInternalFrame4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel70, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel67, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel68, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel69, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jInternalFrame4.setBounds(760, 20, 420, 330);
        jDesktopPane1.add(jInternalFrame4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jInternalFrame5.setVisible(true);
        jLabel54.setText("Capacitancia:");

        jLabel55.setText("Tolerancia:");

        jLValorCapacitor.setFont(new java.awt.Font("Dialog", 1, 18));
        jLValorCapacitor.setForeground(new java.awt.Color(0, 0, 255));
        jLValorCapacitor.setText("Valor");

        jLToleranciaCapacitor.setForeground(new java.awt.Color(255, 0, 0));
        jLToleranciaCapacitor.setText("tol");

        jLabel56.setFont(new java.awt.Font("Dialog", 1, 14));
        jLabel56.setForeground(new java.awt.Color(0, 0, 255));
        jLabel56.setText("pF");

        jLabel57.setForeground(new java.awt.Color(255, 0, 0));
        jLabel57.setText("%");

        org.jdesktop.layout.GroupLayout jInternalFrame5Layout = new org.jdesktop.layout.GroupLayout(jInternalFrame5.getContentPane());
        jInternalFrame5.getContentPane().setLayout(jInternalFrame5Layout);
        jInternalFrame5Layout.setHorizontalGroup(
            jInternalFrame5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jInternalFrame5Layout.createSequentialGroup()
                .addContainerGap()
                .add(jInternalFrame5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel54)
                    .add(jLabel55))
                .add(29, 29, 29)
                .add(jInternalFrame5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jInternalFrame5Layout.createSequentialGroup()
                        .add(jLToleranciaCapacitor)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel57))
                    .add(jInternalFrame5Layout.createSequentialGroup()
                        .add(jLValorCapacitor)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel56)))
                .addContainerGap(155, Short.MAX_VALUE))
        );
        jInternalFrame5Layout.setVerticalGroup(
            jInternalFrame5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jInternalFrame5Layout.createSequentialGroup()
                .addContainerGap()
                .add(jInternalFrame5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel54)
                    .add(jLValorCapacitor)
                    .add(jLabel56))
                .add(21, 21, 21)
                .add(jInternalFrame5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel55)
                    .add(jLToleranciaCapacitor)
                    .add(jLabel57))
                .addContainerGap(48, Short.MAX_VALUE))
        );
        jInternalFrame5.setBounds(790, 370, 360, 150);
        jDesktopPane1.add(jInternalFrame5, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jMenu1.setText("Inicio");
        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem1.setText("Salir");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });

        jMenu1.add(jMenuItem1);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jDesktopPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1204, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jDesktopPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 694, Short.MAX_VALUE)
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        this.establecerValorPosicionCapacitor("0",1);
    }//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
        this.establecerValorPosicionCapacitor("1",1);
    }//GEN-LAST:event_jRadioButton2ActionPerformed

    private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton3ActionPerformed
        this.establecerValorPosicionCapacitor("2",1);
    }//GEN-LAST:event_jRadioButton3ActionPerformed

    private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton4ActionPerformed
        this.establecerValorPosicionCapacitor("3",1);
    }//GEN-LAST:event_jRadioButton4ActionPerformed

    private void jRadioButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton5ActionPerformed
        this.establecerValorPosicionCapacitor("4",1);
    }//GEN-LAST:event_jRadioButton5ActionPerformed

    private void jRadioButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton6ActionPerformed
        this.establecerValorPosicionCapacitor("5",1);
    }//GEN-LAST:event_jRadioButton6ActionPerformed

    private void jRadioButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton7ActionPerformed
        this.establecerValorPosicionCapacitor("6",1);
    }//GEN-LAST:event_jRadioButton7ActionPerformed

    private void jRadioButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton8ActionPerformed
        this.establecerValorPosicionCapacitor("7",1);
    }//GEN-LAST:event_jRadioButton8ActionPerformed

    private void jRadioButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton9ActionPerformed
        this.establecerValorPosicionCapacitor("8",1);
    }//GEN-LAST:event_jRadioButton9ActionPerformed

    private void jRadioButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton10ActionPerformed
        this.establecerValorPosicionCapacitor("9",1);
    }//GEN-LAST:event_jRadioButton10ActionPerformed

    private void jRadioButton39ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton39ActionPerformed
        this.establecerValorPosicionCapacitor("P",4);
    }//GEN-LAST:event_jRadioButton39ActionPerformed

    private void jRadioButton38ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton38ActionPerformed
        this.establecerValorPosicionCapacitor("Z",4);
    }//GEN-LAST:event_jRadioButton38ActionPerformed

    private void jRadioButton37ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton37ActionPerformed
        this.establecerValorPosicionCapacitor("S",4);
    }//GEN-LAST:event_jRadioButton37ActionPerformed

    private void jRadioButton36ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton36ActionPerformed
        this.establecerValorPosicionCapacitor("M",4);
    }//GEN-LAST:event_jRadioButton36ActionPerformed

    private void jRadioButton35ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton35ActionPerformed
        this.establecerValorPosicionCapacitor("K",4);
    }//GEN-LAST:event_jRadioButton35ActionPerformed

    private void jRadioButton34ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton34ActionPerformed
        this.establecerValorPosicionCapacitor("J",4);
    }//GEN-LAST:event_jRadioButton34ActionPerformed

    private void jRadioButton33ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton33ActionPerformed
        this.establecerValorPosicionCapacitor("H",4);
    }//GEN-LAST:event_jRadioButton33ActionPerformed

    private void jRadioButton32ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton32ActionPerformed
        this.establecerValorPosicionCapacitor("G",4);
    }//GEN-LAST:event_jRadioButton32ActionPerformed

    private void jRadioButton31ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton31ActionPerformed
        this.establecerValorPosicionCapacitor("F",4);
    }//GEN-LAST:event_jRadioButton31ActionPerformed

    private void jRadioButton30ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton30ActionPerformed
        this.establecerValorPosicionCapacitor("9",3);
    }//GEN-LAST:event_jRadioButton30ActionPerformed

    private void jRadioButton29ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton29ActionPerformed
        this.establecerValorPosicionCapacitor("8",3);
    }//GEN-LAST:event_jRadioButton29ActionPerformed

    private void jRadioButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton28ActionPerformed
        this.establecerValorPosicionCapacitor("7",3);
    }//GEN-LAST:event_jRadioButton28ActionPerformed

    private void jRadioButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton27ActionPerformed
        this.establecerValorPosicionCapacitor("6",3);
    }//GEN-LAST:event_jRadioButton27ActionPerformed

    private void jRadioButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton26ActionPerformed
        this.establecerValorPosicionCapacitor("5",3);
    }//GEN-LAST:event_jRadioButton26ActionPerformed

    private void jRadioButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton25ActionPerformed
        this.establecerValorPosicionCapacitor("4",3);
    }//GEN-LAST:event_jRadioButton25ActionPerformed

    private void jRadioButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton24ActionPerformed
        this.establecerValorPosicionCapacitor("3",3);
    }//GEN-LAST:event_jRadioButton24ActionPerformed

    private void jRadioButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton23ActionPerformed
        this.establecerValorPosicionCapacitor("2",3);
    }//GEN-LAST:event_jRadioButton23ActionPerformed

    private void jRadioButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton22ActionPerformed
        this.establecerValorPosicionCapacitor("1",2);        
    }//GEN-LAST:event_jRadioButton22ActionPerformed

    private void jRadioButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton20ActionPerformed
        this.establecerValorPosicionCapacitor("9",2);
    }//GEN-LAST:event_jRadioButton20ActionPerformed

    private void jRadioButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton19ActionPerformed
        this.establecerValorPosicionCapacitor("8",2);
    }//GEN-LAST:event_jRadioButton19ActionPerformed

    private void jRadioButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton18ActionPerformed
        this.establecerValorPosicionCapacitor("7",2);
    }//GEN-LAST:event_jRadioButton18ActionPerformed

    private void jRadioButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton17ActionPerformed
        this.establecerValorPosicionCapacitor("6",2);
    }//GEN-LAST:event_jRadioButton17ActionPerformed

    private void jRadioButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton16ActionPerformed
        this.establecerValorPosicionCapacitor("5",2);
    }//GEN-LAST:event_jRadioButton16ActionPerformed

    private void jRadioButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton15ActionPerformed
        this.establecerValorPosicionCapacitor("4",2);
    }//GEN-LAST:event_jRadioButton15ActionPerformed

    private void jRadioButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton14ActionPerformed
        this.establecerValorPosicionCapacitor("3",2);
    }//GEN-LAST:event_jRadioButton14ActionPerformed

    private void jRadioButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton13ActionPerformed
        this.establecerValorPosicionCapacitor("2",2);
    }//GEN-LAST:event_jRadioButton13ActionPerformed

    private void jRadioButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton12ActionPerformed
        this.establecerValorPosicionCapacitor("1",2);
    }//GEN-LAST:event_jRadioButton12ActionPerformed

    private void jRadioButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton11ActionPerformed
        this.establecerValorPosicionCapacitor("0",2);
    }//GEN-LAST:event_jRadioButton11ActionPerformed

    private void jButton63ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton63ActionPerformed
        this.establecerValorPosicion("ninguno", 4);
    }//GEN-LAST:event_jButton63ActionPerformed

    private void jButton62ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton62ActionPerformed
        this.establecerValorPosicion("plateado", 4);
    }//GEN-LAST:event_jButton62ActionPerformed

    private void jButton61ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton61ActionPerformed
        this.establecerValorPosicion("dorado", 4);
    }//GEN-LAST:event_jButton61ActionPerformed

    private void jButton57ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton57ActionPerformed
        this.establecerValorPosicion("azul", 3);
    }//GEN-LAST:event_jButton57ActionPerformed

    private void jButton56ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton56ActionPerformed
        this.establecerValorPosicion("verde", 3);
    }//GEN-LAST:event_jButton56ActionPerformed

    private void jButton55ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton55ActionPerformed
        this.establecerValorPosicion("amarillo", 3);
    }//GEN-LAST:event_jButton55ActionPerformed

    private void jButton54ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton54ActionPerformed
        this.establecerValorPosicion("naranja", 3);
    }//GEN-LAST:event_jButton54ActionPerformed

    private void jButton53ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton53ActionPerformed
        this.establecerValorPosicion("rojo", 3);
    }//GEN-LAST:event_jButton53ActionPerformed

    private void jButton52ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton52ActionPerformed
        this.establecerValorPosicion("cafe", 3);
    }//GEN-LAST:event_jButton52ActionPerformed

    private void jButton51ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton51ActionPerformed
        this.establecerValorPosicion("negro", 3);
    }//GEN-LAST:event_jButton51ActionPerformed

    private void jButton50ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton50ActionPerformed
        this.establecerValorPosicion("blanco", 2);
    }//GEN-LAST:event_jButton50ActionPerformed

    private void jButton49ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton49ActionPerformed
        this.establecerValorPosicion("gris", 2);
    }//GEN-LAST:event_jButton49ActionPerformed

    private void jButton48ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton48ActionPerformed
        this.establecerValorPosicion("violeta", 2);
    }//GEN-LAST:event_jButton48ActionPerformed

    private void jButton47ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton47ActionPerformed
        this.establecerValorPosicion("azul", 2);
    }//GEN-LAST:event_jButton47ActionPerformed

    private void jButton46ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton46ActionPerformed
        this.establecerValorPosicion("verde", 2);
    }//GEN-LAST:event_jButton46ActionPerformed

    private void jButton45ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton45ActionPerformed
        this.establecerValorPosicion("amarillo", 2);
    }//GEN-LAST:event_jButton45ActionPerformed

    private void jButton44ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton44ActionPerformed
        this.establecerValorPosicion("naranja", 2);
    }//GEN-LAST:event_jButton44ActionPerformed

    private void jButton43ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton43ActionPerformed
        this.establecerValorPosicion("rojo", 2);
    }//GEN-LAST:event_jButton43ActionPerformed

    private void jButton42ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton42ActionPerformed
        this.establecerValorPosicion("cafe", 2);
    }//GEN-LAST:event_jButton42ActionPerformed

    private void jButton41ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton41ActionPerformed
        this.establecerValorPosicion("negro", 2);
    }//GEN-LAST:event_jButton41ActionPerformed

    private void jButton40ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton40ActionPerformed
        this.establecerValorPosicion("blanco", 1);
    }//GEN-LAST:event_jButton40ActionPerformed

    private void jButton39ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton39ActionPerformed
        this.establecerValorPosicion("gris", 1);
    }//GEN-LAST:event_jButton39ActionPerformed

    private void jButton38ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton38ActionPerformed
        this.establecerValorPosicion("violeta", 1);
    }//GEN-LAST:event_jButton38ActionPerformed

    private void jButton37ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton37ActionPerformed
        this.establecerValorPosicion("azul", 1);
    }//GEN-LAST:event_jButton37ActionPerformed

    private void jButton36ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton36ActionPerformed
        this.establecerValorPosicion("verde", 1);
    }//GEN-LAST:event_jButton36ActionPerformed

    private void jButton35ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton35ActionPerformed
        this.establecerValorPosicion("amarillo", 1);
    }//GEN-LAST:event_jButton35ActionPerformed

    private void jButton34ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton34ActionPerformed
        this.establecerValorPosicion("naranja", 1);
    }//GEN-LAST:event_jButton34ActionPerformed

    private void jButton33ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton33ActionPerformed
        this.establecerValorPosicion("rojo", 1);
    }//GEN-LAST:event_jButton33ActionPerformed

    private void jButton32ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton32ActionPerformed
        this.establecerValorPosicion("cafe", 1);
    }//GEN-LAST:event_jButton32ActionPerformed

    private void jButton31ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton31ActionPerformed
        this.establecerValorPosicion("negro", 1);
    }//GEN-LAST:event_jButton31ActionPerformed

    private void establecerValorPosicionCapacitor(String capaString, int posicion){
        int valor = 0;
        try {
            valor = capacitor.getValor(posicion, capaString);
        } catch ( ValoresException e ) {
            e.getMessage();
        }
        capacitor.setValor(posicion, new Valor(capaString, valor));
        this.showValorTotalCapacitor();
    }
    private void establecerValorPosicion(String colorString, int posicion){
        JPanel colorPanel = new JPanel();
        JLabel valorLabel = new JLabel();
        Color color = this.obtenerColor(colorString);
        int valor = 0;
        try {
            valor = resistencia.getValor(posicion, colorString);
        } catch (ColoresException ex) {
            ex.printStackTrace();
        }
        
        if(posicion == 1){
            valorLabel = this.jLValorPos1;
            colorPanel = this.jPColorPos1;
        }else if(posicion == 2){
            valorLabel = this.jLValorPos2;
            colorPanel = this.jPColorPos2;
        }else if(posicion == 3){
            valorLabel = this.jLValorMult;
            colorPanel = this.jPColorMult;
        }else if(posicion == 4){
            valorLabel = this.jLValorTol;
            colorPanel = this.jPColorTol;
        }
        
        valorLabel.setText(String.valueOf(valor));
        colorPanel.setBackground(color);
        
        //Establece el nuevo valor para cierta posicion de la resistencia
        resistencia.setValor(posicion, new Valor(colorString, valor));
        this.showValorTotalResistencia();
    }
    
    
    private Color obtenerColor(String colorString){
        Color color = this.getGraphics().getColor();
        if(colorString.equals("negro"))
            color = Color.BLACK;
        else if(colorString.equals("cafe"))
            color = new Color(153, 51, 0);
        else if(colorString.equals("rojo"))
            color = Color.RED;
        else if(colorString.equals("naranja"))
            color = Color.ORANGE;
        else if(colorString.equals("amarillo"))
            color = Color.YELLOW;
        else if(colorString.equals("verde"))
            color = Color.GREEN;
        else if(colorString.equals("azul"))
            color = Color.BLUE;
        else if(colorString.equals("violeta"))
            color = Color.MAGENTA;
        else if(colorString.equals("gris"))
            color = Color.LIGHT_GRAY;
        else if(colorString.equals("blanco"))
            color = Color.WHITE;
        else if(colorString.equals("dorado"))
            color = new Color(204, 204, 0);
        else if(colorString.equals("plateado"))
            color = Color.GRAY;
        return color;
    }
    
    private void inicioValores(){
        Valor valor1 = new Valor("negro", 0);
        Valor valor2 = new Valor("negro", 0);
        Valor valor3 = new Valor("negro", 1);
        Valor valor4 = new Valor("dorado", 5);
        
        Valor valorCap1 = new Valor("0",0);
        Valor valorCap2 = new Valor("0",0);
        Valor valorCap3 = new Valor("1",1);
        Valor valorCap4 = new Valor("F",1);
        try {
            resistencia = new Resistencia(valor1, valor2, valor3, valor4);
            capacitor = new Capacitor(valorCap1,valorCap2,valorCap3,valorCap4);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        this.showValorTotalResistencia();
        this.showValorTotalCapacitor();
    }
    
    private void showValorTotalResistencia(){
        int total = resistencia.obtenerTotal();
        this.jLValorResistencia.setText(String.valueOf(total));
        this.jLTolerancia.setText(String.valueOf(resistencia.getTolerancia()));
    }
    
    private void showValorTotalCapacitor(){
        int total = capacitor.obtenerTotal();
        this.jLValorCapacitor.setText(String.valueOf(total));
        this.jLToleranciaCapacitor.setText(String.valueOf(capacitor.getTolerancia()));
    }
    
    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        System.exit(0);
    }//GEN-LAST:event_jMenuItem1ActionPerformed
    
    public void formula(){
        //Este es un comentario que espero puedan ver
        return;
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                ResistenciaVisual gui = new ResistenciaVisual();
                //gui.setSize(new java.awt.Dimension(990, 670));
                gui.setVisible(true);
            }
        });
    }
    
    private Resistencia resistencia;
    private Capacitor capacitor;
    
    // Declaración de varibales -no modificar//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.ButtonGroup buttonGroup4;
    private javax.swing.JButton jButton31;
    private javax.swing.JButton jButton32;
    private javax.swing.JButton jButton33;
    private javax.swing.JButton jButton34;
    private javax.swing.JButton jButton35;
    private javax.swing.JButton jButton36;
    private javax.swing.JButton jButton37;
    private javax.swing.JButton jButton38;
    private javax.swing.JButton jButton39;
    private javax.swing.JButton jButton40;
    private javax.swing.JButton jButton41;
    private javax.swing.JButton jButton42;
    private javax.swing.JButton jButton43;
    private javax.swing.JButton jButton44;
    private javax.swing.JButton jButton45;
    private javax.swing.JButton jButton46;
    private javax.swing.JButton jButton47;
    private javax.swing.JButton jButton48;
    private javax.swing.JButton jButton49;
    private javax.swing.JButton jButton50;
    private javax.swing.JButton jButton51;
    private javax.swing.JButton jButton52;
    private javax.swing.JButton jButton53;
    private javax.swing.JButton jButton54;
    private javax.swing.JButton jButton55;
    private javax.swing.JButton jButton56;
    private javax.swing.JButton jButton57;
    private javax.swing.JButton jButton61;
    private javax.swing.JButton jButton62;
    private javax.swing.JButton jButton63;
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JInternalFrame jInternalFrame1;
    private javax.swing.JInternalFrame jInternalFrame2;
    private javax.swing.JInternalFrame jInternalFrame3;
    private javax.swing.JInternalFrame jInternalFrame4;
    private javax.swing.JInternalFrame jInternalFrame5;
    private javax.swing.JLabel jLTolerancia;
    private javax.swing.JLabel jLToleranciaCapacitor;
    private javax.swing.JLabel jLValorCapacitor;
    private javax.swing.JLabel jLValorMult;
    private javax.swing.JLabel jLValorPos1;
    private javax.swing.JLabel jLValorPos2;
    private javax.swing.JLabel jLValorResistencia;
    private javax.swing.JLabel jLValorTol;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPColorMult;
    private javax.swing.JPanel jPColorPos1;
    private javax.swing.JPanel jPColorPos2;
    private javax.swing.JPanel jPColorTol;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel43;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel49;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel50;
    private javax.swing.JPanel jPanel51;
    private javax.swing.JPanel jPanel52;
    private javax.swing.JPanel jPanel53;
    private javax.swing.JPanel jPanel54;
    private javax.swing.JPanel jPanel55;
    private javax.swing.JPanel jPanel56;
    private javax.swing.JPanel jPanel57;
    private javax.swing.JPanel jPanel58;
    private javax.swing.JPanel jPanel59;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel60;
    private javax.swing.JPanel jPanel61;
    private javax.swing.JPanel jPanel62;
    private javax.swing.JPanel jPanel63;
    private javax.swing.JPanel jPanel64;
    private javax.swing.JPanel jPanel65;
    private javax.swing.JPanel jPanel66;
    private javax.swing.JPanel jPanel67;
    private javax.swing.JPanel jPanel68;
    private javax.swing.JPanel jPanel69;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel70;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton10;
    private javax.swing.JRadioButton jRadioButton11;
    private javax.swing.JRadioButton jRadioButton12;
    private javax.swing.JRadioButton jRadioButton13;
    private javax.swing.JRadioButton jRadioButton14;
    private javax.swing.JRadioButton jRadioButton15;
    private javax.swing.JRadioButton jRadioButton16;
    private javax.swing.JRadioButton jRadioButton17;
    private javax.swing.JRadioButton jRadioButton18;
    private javax.swing.JRadioButton jRadioButton19;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton20;
    private javax.swing.JRadioButton jRadioButton22;
    private javax.swing.JRadioButton jRadioButton23;
    private javax.swing.JRadioButton jRadioButton24;
    private javax.swing.JRadioButton jRadioButton25;
    private javax.swing.JRadioButton jRadioButton26;
    private javax.swing.JRadioButton jRadioButton27;
    private javax.swing.JRadioButton jRadioButton28;
    private javax.swing.JRadioButton jRadioButton29;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JRadioButton jRadioButton30;
    private javax.swing.JRadioButton jRadioButton31;
    private javax.swing.JRadioButton jRadioButton32;
    private javax.swing.JRadioButton jRadioButton33;
    private javax.swing.JRadioButton jRadioButton34;
    private javax.swing.JRadioButton jRadioButton35;
    private javax.swing.JRadioButton jRadioButton36;
    private javax.swing.JRadioButton jRadioButton37;
    private javax.swing.JRadioButton jRadioButton38;
    private javax.swing.JRadioButton jRadioButton39;
    private javax.swing.JRadioButton jRadioButton4;
    private javax.swing.JRadioButton jRadioButton5;
    private javax.swing.JRadioButton jRadioButton6;
    private javax.swing.JRadioButton jRadioButton7;
    private javax.swing.JRadioButton jRadioButton8;
    private javax.swing.JRadioButton jRadioButton9;
    // Fin de declaración de variables//GEN-END:variables
    
}
